package cn.edu.cdu.farmdeal.service.impl;

import cn.edu.cdu.farmdeal.domain.Product;
import cn.edu.cdu.farmdeal.mapper.ProductMapper;
import cn.edu.cdu.farmdeal.service.ProductService;
import cn.edu.cdu.farmdeal.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: tupeng
 * @Date: 2020/3/14
 **/
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;
//    @Autowired
//    private

    @Override
    public int getTotalCount(String inputvalue) {
        return productMapper.getTotalCount(inputvalue);
    }

    @Override
    public List<Product> search(String inputvalue, Page page) {
        return productMapper.search(inputvalue,page);
    }
}
